<template>
    <div>
        <el-menu default-active="activeMenu" class="el-menu-vertical-demo"
            background-color="rgba(48, 65, 86)" text-color="#fff" active-text-color="#ffd04b"
            @open="handleOpen" @close="handleClose" :collapse="isCollapse">

            <el-menu-item index="1" @click="goRouter('/home')">
                <i class="el-icon-s-home"></i>
                <span slot="title">首页</span>
            </el-menu-item>
            <el-menu-item index="2" @click="goRouter('/workbench')">
                <i class="el-icon-menu"></i>
                <span slot="title">门诊医生工作台</span>
            </el-menu-item>
            <el-submenu index="3">
                <template slot="title">
                    <i class="el-icon-location"></i>
                    <span>疾病目录</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="1-1" @click="goRouter('/disease')">诊断目录管理</el-menu-item>
                    <el-menu-item index="1-2" @click="goRouter('/Fmeditem')">非药品收费项目</el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <el-menu-item index="3" @click="goRouter('/sortTable')">
                <i class="el-icon-menu"></i>
                <span slot="title">排班表</span>
            </el-menu-item>
            <el-menu-item index="6" @click="goRouter('/Register')">
                <i class="el-icon-s-claim"></i>
                <span slot="title">挂号管理</span>
            </el-menu-item>
            <el-menu-item index="7" @click="goRouter('/settlecategory')">
                <i class="el-icon-menu"></i>
                <span slot="title">结算类别管理</span>
            </el-menu-item>
            <el-submenu index="4">
                <template slot="title">
                    <i class="el-icon-location"></i>
                    <span>科室模块</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="2-1" @click="goRouter('/department')">科室管理</el-menu-item>
                    <el-menu-item index="2-2">选项2</el-menu-item>
                </el-menu-item-group>
            </el-submenu>

        </el-menu>
    </div>
</template>

<script>
export default {
    name: "CommonAside",
    data() {
        return {

        }
    },methods:{
        goRouter(val){
            this.$router.push(val)
        },

        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        },
    },computed:{
        isCollapse(){
            return this.$store.state.tab.isCollapse
        }
    }
}
</script>



<style scoped>
.el-menu{
    height: 100vh;
 
}
</style>